package com.miracle.system.domain;

import com.miracle.system.base.domain.BaseEntity;
import io.swagger.annotations.ApiModelProperty;
import org.springframework.data.annotation.Transient;

import java.util.List;

/**
 * @author ：miracle.cui
 * @description：TODO
 * @date ：2020/7/22 9:50
 */

public class SysResource extends BaseEntity {

    /**
     * 资源ID
     */
    @ApiModelProperty(value = "资源ID")
    private Integer resourceId;

    /**
     * 资源编码
     */
    private String resourceCode;

    /**
     * 资源名称
     */
    private String resourceName;

    /**
     * 资源标题
     */
    private String resourceLabel;

    /**
     * 父资源
     */
    private Integer parentResourceId;

    /**
     * 资源类型
     */
    private String resourceType; // menu:菜单 button:按钮

    /**
     * 显示顺序
     */
    private Integer seq;

    /**
     * URL
     */
    private String url;

    /**
     * 图片路径
     */
    private String imagePath;

    /**
     * 打开方式
     */
    private String openMode;

    /**
     * 全路径
     */
    private String fullpath;

    /**
     * vue路径
     */
    private String path;

    /**
     * 是否分支
     */
    private String isBranch;

    /**
     * 是否有效
     */
    private String status;

    /**
     * 系统类型
     */
    private String systemType;

    /**
     * 资源说明
     */
    private String resourceDesc;

    /**
     * 备注
     */
    private String remark;

    @Transient
    private List<SysResource> children;

    public Integer getResourceId() {
        return resourceId;
    }

    public void setResourceId(Integer resourceId) {
        this.resourceId = resourceId;
    }

    public String getResourceCode() {
        return resourceCode;
    }

    public void setResourceCode(String resourceCode) {
        this.resourceCode = resourceCode;
    }

    public String getResourceName() {
        return resourceName;
    }

    public void setResourceName(String resourceName) {
        this.resourceName = resourceName;
    }

    public String getResourceLabel() {
        return resourceLabel;
    }

    public void setResourceLabel(String resourceLabel) {
        this.resourceLabel = resourceLabel;
    }

    public Integer getParentResourceId() {
        return parentResourceId;
    }

    public void setParentResourceId(Integer parentResourceId) {
        this.parentResourceId = parentResourceId;
    }

    public String getResourceType() {
        return resourceType;
    }

    public void setResourceType(String resourceType) {
        this.resourceType = resourceType;
    }

    public Integer getSeq() {
        return seq;
    }

    public void setSeq(Integer seq) {
        this.seq = seq;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getImagePath() {
        return imagePath;
    }

    public void setImagePath(String imagePath) {
        this.imagePath = imagePath;
    }

    public String getOpenMode() {
        return openMode;
    }

    public void setOpenMode(String openMode) {
        this.openMode = openMode;
    }

    public String getFullpath() {
        return fullpath;
    }

    public void setFullpath(String fullpath) {
        this.fullpath = fullpath;
    }

    public String getIsBranch() {
        return isBranch;
    }

    public void setIsBranch(String isBranch) {
        this.isBranch = isBranch;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getSystemType() {
        return systemType;
    }

    public void setSystemType(String systemType) {
        this.systemType = systemType;
    }

    public String getResourceDesc() {
        return resourceDesc;
    }

    public void setResourceDesc(String resourceDesc) {
        this.resourceDesc = resourceDesc;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public List<SysResource> getChildren() {
        return children;
    }

    public void setChildren(List<SysResource> children) {
        this.children = children;
    }

    public Boolean getHasChildren() {
        return "Y".equals(isBranch);
    }

}
